//
//  ViewController.m
//  UIScrollView
//
//  Created by dllo on 16/7/20.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
    [self.view addSubview:scrollView];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(20, 50, self.view.frame.size.width - 40, 50);
    button.backgroundColor = [UIColor redColor];
    [scrollView addSubview:button];
    scrollView.contentSize = CGSizeMake(1000, 1000);
    scrollView.contentInset = UIEdgeInsetsMake(50, 50, 50, 50);
    
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
